package com.cq.androidtools.room1

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.ForeignKey.CASCADE
import androidx.room.PrimaryKey

/**
 * 作者: CQ
 * 日期: 2021-05-12
 * 说明: 老师
 */
@Entity(
    tableName = "B", foreignKeys = [ForeignKey(
        entity = Student::class,
        parentColumns = ["sId"], childColumns = ["id"], onDelete = CASCADE
    )]
)
class B(
    @PrimaryKey(autoGenerate = true)
    var id: Int,
    @ColumnInfo
    var sex: String
)